<template>
	<view class="content gradient-container">
		<view class="status_bar">
			<!-- 占位符 -->
		</view>
		<view class="pagetitle">
			
			<view class="center" style="height: 44pt;width: 120pt;">
				<text style="margin: 12pt 0pt;">个人中心</text>
			</view>
		</view>
		<view style="height:48pt;width:109pt; " class="header-container panding">
			<image style="width:48pt;height: 48pt;"	src="/static/my-page/yaoqing／img_庭院.png"></image>
			<view class="title-box">
				<text style="text-align: center;"
				class="title-text">管理员</text>
			</view>
		</view>
  <view>
    <view style="display: flex;justify-content: space-around;" class="list">
      <view class="grid-item-box" @click="handleIconClick(1)">
        <image src="/static/my-page/收益.png" class="img1"></image>
        <text class="text">提现管理</text>
      </view>
    
    
      <view class="grid-item-box" @click="handleIconClick(2)">
        <image src="/static/my-page/商家管理.png" class="img1"></image>
        <text class="text">商家管理</text>
      </view>
    
    
      <view class="grid-item-box" @click="handleIconClick(3)">
        <image src="/static/my-page/企业管理.png" class="img1"></image>
        <text class="text">入驻审核</text>
      </view>
    </view>
  </view>
  <view class="list">
	  <view style="display: flex;padding: 9pt;align-items: center;aposition: relative;" 
	  v-for="(item,index) in list_a"
	  >
		  <image
		  :src="item.src"
		  style="height: 22pt;width: 22pt;margin: 9pt;"></image>
		  
		  <text style="margin: 7pt;">{{item.title}}</text>
		  <uni-icons type="right" style="position: absolute;right: 8%;"></uni-icons>
	  </view>
	
  </view>
	</view>
	
	
</template>

<script setup>
import { ref } from 'vue';

	const list_a=ref([
		{
			src:'/static/my-page/1.png',
			title:'角色切换'
		},
		{
			src:'/static/my-page/2.png',
			title:'个人信息'
		},
		{
			src:'/static/my-page/3.png',
			title:'账户安全'
		},
		{
			src:'/static/my-page/4.png',
			title:'基本设置'
		},
		{
			src:'/static/my-page/5.png',
			title:'关于我们'
		},
	]);
 const handleIconClick=(index)=>{
	 //跳转逻辑
	 if (index===1){
		  uni.navigateTo({
			url: '/pages/guanliyuan/my_application？level=1',
			fail: (err) => {
			  console.warn('navigateTo失败，降级用redirectTo', err);
			  uni.redirectTo({ url: '/pages/guanliyuan/my_application?level=0' });
			}
		  });};
	if (index===2){
		  			  uni.redirectTo({ url: '/pages/guanliyuan/my_earings' });
};
	 
 }
</script>

<style>
.content{
	 position: relative;
}
	.header-container {
	  position: relative;
	  display: flex;
	  align-items: center;
	  justify-content: space-between;
	  padding: 0 20rpx;
	  background-color: rgba(0,0,0,0);
	}
	.title-text {
	  font-size: 32rpx;
	  font-weight: bold;
	  color: #333;
	}
	.panding{
		padding: 20pt;
	}
	.grid-item-box {
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  justify-content: center;
	  height: 50pt;
	  width: 40pt;
	  padding: 15pt;
	}
	
	.text {
	  font-size: 12px;
	  margin-top: 5px;
	}
	.img1{
		width: 32px;
		height:32pt;
	}
	.list{
		background-color: #ffffff;
		border-radius: 10pt;
		box-shadow: 2pt 2pt 4pt #e1e1e1;
		margin: 8pt;
	}
	.center{
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.pagetitle{
		position: relative;
		display: flex;
		width: 100%;
		height: 44pt;
		align-items: center;
		justify-content: center;
	}
	</style>
